<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
   
    <style>
        ul.list li:first-child {
            color: red;
        }

        .active {
            background: blue;
        }
    </style>
</head>
<body>
    <ul class="list">
        <li class="active">item1</li>
        <li>item2</li>
        <li>item3</li>
        <li>item4</li>
        <li>item5</li>
        <li>item6</li>
    </ul>

    <script>

        // 删除dom
        // removeChild

        var ul = document.getElementsByClassName('list')
        var firstLi = document.querySelector('ul.list li:first-child')

        console.log(ul)
        ul[0].removeChild(firstLi)
        console.log(firstLi);
    </script>
</body>
</html>